<?php

namespace App\Trip\Epidemic\Juhe;

use GuzzleHttp\Client;

abstract class JuheAbstract
{
    public array     $result          = [];
    protected string $key;
    protected Client $client;
    protected bool   $circuit_breaker = false;
    protected bool   $refresh         = false;

    public function __construct()
    {
        $this->key    = config('juhe.api_key');
        $this->client = new Client();
    }

    public function refresh()
    {
        $this->refresh = true;
    }

    abstract public function query(?array $param);

    abstract public function getResult();
}